% !TeX root = ./forallxyyc.tex
\documentclass[openany,oneside,11pt,portuguese]{memoir}
%\documentclass[openany,oneside,11pt,brazil]{memoir}
\usepackage{forallxyyc}
\usepackage[absolute,overlay]{textpos}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[portuguese]{babel}
%\usepackage[brazil]{babel}
\RequirePackage[a-1b]{pdfx}

% set stock & paper size with narrow margins

\setstocksize{8in}{5in}

\settrimmedsize{\stockheight}{\stockwidth}{*}
\settrims{0pt}{0pt}

% let's calculate the line length for 65 characters in \normalfont

\setlxvchars

% set the size of the type block to golden ratio calculated width

\settypeblocksize{*}{1.05\lxvchars}{1.62}

% set spine and and edge margin

\setlrmargins{*}{*}{1}
\setulmargins{.6in}{*}{*}
\setheaderspaces{*}{*}{1}

\checkandfixthelayout
\definecolor{lyallpink}{RGB}{222,31,149}
\colorlet{leadbeater}{lyallpink}
\colorlet{dkleadbeater}{lyallpink!80!black}
\colorlet{ltleadbeater}{lyallpink!50}
\colorlet{vltleadbeater}{lyallpink!3}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Renewcommand
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand*{\practiceproblems}{
	\setcounter{ProbPart}{0}\section*{Exercícios Práticos}%
  \sectionmark{Exercícios Práticos}%
	\addcontentsline{toc}{section}{Exercícios Práticos}
}
\renewcommand*{\printpartname}{%
  \partnamefont PARTE}
\begin{document}

% discard page after cover
%\AtBeginShipoutNext{\AtBeginShipoutNext{\AtBeginShipoutDiscard}}

\midsloppy

% Cover Page

\thispagestyle{empty}

\begin{textblock*}{\stockwidth}(0in,3.5in)
  \noindent\includegraphics{assets/forallx-coverart-screen.pdf}
\end{textblock*}

% make front cover
\begin{textblock*}{0in}(0in,0in)
  \noindent\hfill
  \begin{minipage}[b][\stockheight][s]{.9\stockwidth}
    \begin{raggedleft}
      \vspace*{1.7cm}
      \hfill
      \sffamily\fontsize{66pt}{0pt}\selectfont
      \color{lyallpink}
      \textbf{forall}%
      \fontsize{80pt}{0pt}\selectfont\rmfamily\textit{\textbf{x}\/}
                    
      \vskip.5cm
          
      \sffamily\fontsize{24pt}{0pt}\selectfont
      \color{black}
      \textbf{\uppercase{Calgary}}

      \vspace*{1cm}
      \color{black}
      \sffamily
      \fontsize{20pt}{22pt}\selectfont
      \textbf{Uma Introdução à\\ Lógica Formal}

      \vfill
      \fontsize{11pt}{14pt}\selectfont
      \color{white}
      \textbf{P.~D. Magnus}\\
      \textbf{Tim Button}\\
      \textit{com adições de}\\
      \textbf{J.~Robert Loftis}\\
      \textbf{Robert Trueman}\\
      \textit{remixado e revisado por}\\
      \textbf{Aaron Thomas-Bolduc}\\ \textbf{Richard Zach}\par
      \textit{traduzido por}\\
      \textbf{Lauro Morais}\\ \textbf{Silvio Arcanjo Jr.}\\ 
      \textbf{Nicholas Ferreira}\\ \textbf{Alessandro Duarte}\\
      \vspace{1cm}
      \textbf{\forallxversion}\par
      \vspace{1cm}
    \end{raggedleft}
  \end{minipage}
  \hspace*{1cm}
\end{textblock*}
\ 
\newpage
\color{black}
\setlength{\barlength}{0pt} % no bar next to chapter headings in ebook

\input{forallx-yyc-content}

\end{document}
